load(file.path("..","Annotation_copy","output","v3.0annotation","Brgo.v3.0anno.Atgoslim.BP.list.Rdata"))
# GOseq
library(ShortRead);library(goseq);library(GO.db);library("annotate")
## Loading required package: BiocGenerics
## Loading required package: parallel
##
## Attaching package: 'BiocGenerics'
## The following objects are masked from 'package:parallel':
##
## clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
## clusterExport, clusterMap, parApply, parCapply, parLapply,
## parLapplyLB, parRapply, parSapply, parSapplyLB
## The following objects are masked from 'package:dplyr':
##
## combine, intersect, setdiff, union
## The following object is masked from 'package:limma':
##
## plotMA
## The following objects are masked from 'package:stats':
##
## IQR, mad, sd, var, xtabs
## The following objects are masked from 'package:base':
##
## anyDuplicated, append, as.data.frame, basename, cbind, colnames,
## dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
## grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
## order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
## rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
## union, unique, unsplit, which, which.max, which.min
## Loading required package: BiocParallel
## Loading required package: Biostrings
## Loading required package: S4Vectors
## Loading required package: stats4
##
## Attaching package: 'S4Vectors'
## The following objects are masked from 'package:dplyr':
##
## first, rename
## The following object is masked from 'package:tidyr':
##
## expand
## The following object is masked from 'package:base':
##
## expand.grid
## Loading required package: IRanges
##
## Attaching package: 'IRanges'
## The following objects are masked from 'package:dplyr':
##
## collapse, desc, slice
## The following object is masked from 'package:purrr':
##
## reduce
## Loading required package: XVector
##
## Attaching package: 'XVector'
## The following object is masked from 'package:purrr':
##
## compact
##
## Attaching package: 'Biostrings'
## The following object is masked from 'package:base':
##
## strsplit
## Loading required package: Rsamtools
## Loading required package: GenomeInfoDb
## Loading required package: GenomicRanges
## Loading required package: GenomicAlignments
## Loading required package: SummarizedExperiment
## Loading required package: Biobase
## Welcome to Bioconductor
##
## Vignettes contain introductory material; view with
## 'browseVignettes()'. To cite Bioconductor, see
## 'citation("Biobase")', and for packages 'citation("pkgname")'.
## Loading required package: DelayedArray
## Loading required package: matrixStats
##
## Attaching package: 'matrixStats'
## The following objects are masked from 'package:Biobase':
##
## anyMissing, rowMedians
## The following object is masked from 'package:dplyr':
##
## count
##
## Attaching package: 'DelayedArray'
## The following objects are masked from 'package:matrixStats':
##
## colMaxs, colMins, colRanges, rowMaxs, rowMins, rowRanges
## The following object is masked from 'package:purrr':
##
## simplify
## The following objects are masked from 'package:base':
##
## aperm, apply, rowsum
##
## Attaching package: 'GenomicAlignments'
## The following object is masked from 'package:dplyr':
##
## last
##
## Attaching package: 'ShortRead'
## The following object is masked from 'package:dplyr':
##
## id
## The following object is masked from 'package:purrr':
##
## compose
## The following object is masked from 'package:tibble':
##
## view
## Loading required package: BiasedUrn
## Loading required package: geneLenDataBase
##
## Attaching package: 'geneLenDataBase'
## The following object is masked from 'package:S4Vectors':
##
## unfactor
##
## Loading required package: AnnotationDbi
##
## Attaching package: 'AnnotationDbi'
## The following object is masked from 'package:dplyr':
##
## select
## Loading required package: XML
# for ggplot heatmap
## uncompress gz file
system(paste("gunzip -c ",file.path("..","Annotation_copy","input","v3.0annotation","Brapa_genome_v3.0_cds.gz")," > ",file.path("..","Annotation_copy","input","v3.0annotation","Brapa_genome_v3.0_cds.fa")))
## read cDNA fasta file
Bra.v3.0_cdna<-readDNAStringSet(file.path("..","Annotation_copy","input","v3.0annotation","Brapa_genome_v3.0_cds.fa")) # copied from /Volumes/data_work/Data8/NGS_related/Brassica_rapa_Upendra/G3
Bra.v3.0_cdna
## A DNAStringSet instance of length 46250
## width seq names
## [1] 1254 ATGCGACCACCGGGTGTTGTT...GAGTCTCTCTTGCTCGCTTAA BraA01g000010.3C
## [2] 1668 ATGCCAGCAATGCATGCCGTT...AGATGGATCACAAAAGATTAA BraA01g000020.3C
## [3] 957 ATGATGCTTCTCGTTCATACC...AACTTGGAGTTCCCTGAGTGA BraA01g000030.3C
## [4] 1299 ATGAGTCGTCTTCTCCTTGCT...GGGTCACGAGATGAGCTATAA BraA01g000040.3C
## [5] 774 ATGGATTCTGGGCTTCAGCAT...GGAAAGCAGTTCCTTTCGTGA BraA01g000050.3C
## ... ... ...
## [46246] 162 ATGCGTCCGTCCTCAGCTCCC...TCTTTGGTGGTCCGGTTCTAA BraAnng001840.3C
## [46247] 1455 ATGTCTAATCAAGGATCAGGA...ACAGGTTTGTTTAGGTGCTAA BraAnng001850.3C
## [46248] 1011 ATGGACAACGTAATTCTGAAA...TCAGGGAAGAAAAGCCCCTGA BraAnng006150.3C
## [46249] 870 ATGTTTCCAAGACGTACAAGG...AGCAGTTGTCCTTATAGTTAG BraAnng000040.3C
## [46250] 1338 ATGCCGCAACAATACTGGAAC...GGAGAGAACCTTATCTCCTGA BraAnng003440.3C
## remove fasta file
system(paste("rm ",file.path("..","Annotation_copy","input","v3.0annotation","Brapa_genome_v3.0_cds.fa"),sep=""))
# GOseq function
GOseq.Brgo.v3.0.Atgoslim.BP.list.ORA<-function(genelist,padjust=0.05,ontology="BP",custom.category.list=Brgo.v3.0anno.Atgoslim.BP.list,Br_cdna=Bra.v3.0_cdna) { # return GO enrichment table, padjus, padjust=0.05.
bias<-nchar(Br_cdna)
names(bias)<-names(Br_cdna)
TF<-(names(bias) %in% genelist)*1
names(TF)<-names(bias)
#print(TF)
pwf<-nullp(TF,bias.data=bias)
#print(pwf$DEgenes)
GO.pval <- goseq(pwf,gene2cat=custom.category.list,use_genes_without_cat=TRUE) # format became different in new goseq version (021111). Does not work (042716)
#GO.pval <- goseq(pwf,gene2cat=Brgo.DF3,use_genes_without_cat=TRUE) # format became different in new goseq version (021111)
#head(GO.pval)
if(ontology=="BP") {
GO.pval2<-subset(GO.pval,ontology=="BP")
} else if(ontology=="CC") {
GO.pval2<-subset(GO.pval,ontology=="CC")
} else {
GO.pval2<-subset(GO.pval,ontology=="MF")
}
GO.pval2$over_represented_padjust<-p.adjust(GO.pval2$over_represented_pvalue,method="BH")
if(GO.pval2$over_represented_padjust[1]>padjust) return("no enriched GO")
else {
enriched.GO<-GO.pval2[GO.pval2$over_represented_padjust<padjust,]
print("enriched.GO is")
print(enriched.GO)
## write Term and Definition
for(i in 1:dim(enriched.GO)[1]) {
if(is.null(Term(GOTERM[enriched.GO[i,"category"]]))) {next} else {
enriched.GO$Term[i]<-Term(GOTERM[[enriched.GO[i,"category"]]])
enriched.GO$Definition[i]<-Definition(GOTERM[[enriched.GO[i,"category"]]])
}
}
return(enriched.GO)
}
}
#
head(Bra.v3.0_cdna)
## A DNAStringSet instance of length 6
## width seq names
## [1] 1254 ATGCGACCACCGGGTGTTGTTTC...CTGAGTCTCTCTTGCTCGCTTAA BraA01g000010.3C
## [2] 1668 ATGCCAGCAATGCATGCCGTTTT...GTAGATGGATCACAAAAGATTAA BraA01g000020.3C
## [3] 957 ATGATGCTTCTCGTTCATACCCG...GGAACTTGGAGTTCCCTGAGTGA BraA01g000030.3C
## [4] 1299 ATGAGTCGTCTTCTCCTTGCTCA...GTGGGTCACGAGATGAGCTATAA BraA01g000040.3C
## [5] 774 ATGGATTCTGGGCTTCAGCATCT...AAGGAAAGCAGTTCCTTTCGTGA BraA01g000050.3C
## [6] 3327 ATGGCGTCCACTCCTCCTCAAAA...GCGGTGGGTTTCAATTTCCTTGA BraA01g000060.3C
# length(bias) # 44239 > 45019 where the bias come from?
# bias.data vector must have the same length as DEgenes vector!
twoafternoon.trtlive.DEGs.all.v3.0anno<-read_csv(file=file.path("..","output","twoafternoon.trtlive.DEGs.all.v3.0anno.csv"))
## Parsed with column specification:
## cols(
## genes = col_character(),
## logFC = col_double(),
## logCPM = col_double(),
## LR = col_double(),
## PValue = col_double(),
## FDR = col_double(),
## AGI = col_character(),
## At_symbol = col_character(),
## At_short_description = col_character(),
## perc_ID = col_double()
## )
library(dplyr)
#genelist.up<-base::get(paste("../output/",DEG.objs.v3.0annotation.unique[n],sep="")) %>% rownames_to_column() %>% dplyr::filter(logFC>0) # does not work
temp<-twoafternoon.trtlive.DEGs.all.v3.0anno
genelist.up<-temp[temp[,"logFC"]>0&temp[,"FDR"]<0.05,"genes"];genelist.down<-temp[temp[,"logFC"]<0&temp[,"FDR"]<0.05,"genes"]
# check logFC value ()
temp[temp[,3]>0&temp[,3]<0.05,"logFC"] # previous version (before Feb 7, 2020)
temp[temp[,"logFC"]>0&temp[,"FDR"]<0.05,"logFC"] # revised version (after Feb 7, 2020)
print(paste("number of up genes is ",dim(genelist.up)[1]))
## [1] "number of up genes is 459"
# expression pattern of upregulated genes
gene.of.interest.FDR.up <- twoafternoon.trtlive.DEGs.all.v3.0anno %>% filter(FDR< 0.05,logFC>0) %>%
dplyr::select(genes,logFC,FDR) %>% arrange(FDR)
print("logFC>0")
## [1] "logFC>0"
p.up1<-expression.pattern.Br.graph.timecourse.v3.0annotation.cpm(target.genes.FDR=gene.of.interest.FDR.up[1,]);p.up1
## Warning: Column `sample` joining character vector and factor, coercing into
## character vector
## Warning: Column `target_id`/`genes` joining factor and character vector,
## coercing into character vector
p.up2<-expression.pattern.Br.graph.timecourse.v3.0annotation.cpm(target.genes.FDR=gene.of.interest.FDR.up[2,]);p.up2
## Warning: Column `sample` joining character vector and factor, coercing into
## character vector
## Warning: Column `target_id`/`genes` joining factor and character vector,
## coercing into character vector
p.up3<-expression.pattern.Br.graph.timecourse.v3.0annotation.cpm(target.genes.FDR=gene.of.interest.FDR.up[3,]);p.up3
## Warning: Column `sample` joining character vector and factor, coercing into
## character vector
## Warning: Column `target_id`/`genes` joining factor and character vector,
## coercing into character vector
p.up4<-expression.pattern.Br.graph.timecourse.v3.0annotation.cpm(target.genes.FDR=gene.of.interest.FDR.up[4,]);p.up4
## Warning: Column `sample` joining character vector and factor, coercing into
## character vector
## Warning: Column `target_id`/`genes` joining factor and character vector,
## coercing into character vector
p.up5<-expression.pattern.Br.graph.timecourse.v3.0annotation.cpm(target.genes.FDR=gene.of.interest.FDR.up[5,]);p.up5
## Warning: Column `sample` joining character vector and factor, coercing into
## character vector
## Warning: Column `target_id`/`genes` joining factor and character vector,
## coercing into character vector
# expression pattern of diwbregulated genes
gene.of.interest.FDR.down <- twoafternoon.trtlive.DEGs.all.v3.0anno %>% filter(FDR< 0.05,logFC<0) %>% dplyr::select(genes,logFC,FDR) %>% arrange(FDR)
print("logFC<0")
## [1] "logFC<0"
p.down1<-expression.pattern.Br.graph.timecourse.v3.0annotation.cpm(target.genes.FDR=gene.of.interest.FDR.down[1,]);p.down1
## Warning: Column `sample` joining character vector and factor, coercing into
## character vector
## Warning: Column `target_id`/`genes` joining factor and character vector,
## coercing into character vector
p.down2<-expression.pattern.Br.graph.timecourse.v3.0annotation.cpm(target.genes.FDR=gene.of.interest.FDR.down[2,]);p.down2
## Warning: Column `sample` joining character vector and factor, coercing into
## character vector
## Warning: Column `target_id`/`genes` joining factor and character vector,
## coercing into character vector
p.down3<-expression.pattern.Br.graph.timecourse.v3.0annotation.cpm(target.genes.FDR=gene.of.interest.FDR.down[3,]);p.down3
## Warning: Column `sample` joining character vector and factor, coercing into
## character vector
## Warning: Column `target_id`/`genes` joining factor and character vector,
## coercing into character vector
p.down4<-expression.pattern.Br.graph.timecourse.v3.0annotation.cpm(target.genes.FDR=gene.of.interest.FDR.down[4,]);p.down4
## Warning: Column `sample` joining character vector and factor, coercing into
## character vector
## Warning: Column `target_id`/`genes` joining factor and character vector,
## coercing into character vector
p.down5<-expression.pattern.Br.graph.timecourse.v3.0annotation.cpm(target.genes.FDR=gene.of.interest.FDR.down[5,]);p.down5
## Warning: Column `sample` joining character vector and factor, coercing into
## character vector
## Warning: Column `target_id`/`genes` joining factor and character vector,
## coercing into character vector
#genelist.down<-read_csv(paste("../output/",file,sep="")) %>% dplyr::filter(logFC.genotypeR500<0)
if(dim(genelist.up)[1]<3) {print("Number of up genes is smaller than three. Skip this."); GO.ORA.temp.up<-"no enriched GO";next} else {GO.ORA.temp.up<-GOseq.Brgo.v3.0.Atgoslim.BP.list.ORA(as_vector(genelist.up)) }
## Warning in pcls(G): initial point very close to some inequality constraints
## Using manually entered categories.
## Calculating the p-values...
## 'select()' returned 1:1 mapping between keys and columns
## [1] "enriched.GO is"
## category over_represented_pvalue under_represented_pvalue numDEInCat
## 3164 GO:0071732 6.820561e-08 1.0000000 8
## 3114 GO:0071369 2.089131e-07 1.0000000 8
## 1195 GO:0010167 1.021437e-06 0.9999999 7
## 3094 GO:0071281 1.955280e-06 0.9999998 8
## 1530 GO:0016036 7.136493e-06 0.9999990 10
## 254 GO:0006096 2.202118e-05 0.9999970 9
## 1445 GO:0015706 8.135340e-05 0.9999948 5
## numInCat term ontology
## 3164 52 cellular response to nitric oxide BP
## 3114 62 cellular response to ethylene stimulus BP
## 1195 53 response to nitrate BP
## 3094 77 cellular response to iron ion BP
## 1530 148 cellular response to phosphate starvation BP
## 254 138 glycolytic process BP
## 1445 39 nitrate transport BP
## over_represented_padjust
## 3164 0.0002584311
## 3114 0.0003957859
## 1195 0.0012900754
## 3094 0.0018521386
## 1530 0.0054080343
## 254 0.0139063745
## 1445 0.0440354306
print(paste("number of down genes is ",dim(genelist.down)[1]))
## [1] "number of down genes is 1015"
if(dim(genelist.down)[1]<3) {print("Number of up genes is smaller than three. Skip this."); GO.ORA.temp.down<-"no enriched GO"; next} else {GO.ORA.temp.down<-GOseq.Brgo.v3.0.Atgoslim.BP.list.ORA(as_vector(genelist.down)) }
## Warning in pcls(G): initial point very close to some inequality constraints
## Using manually entered categories.
## Calculating the p-values...
## 'select()' returned 1:1 mapping between keys and columns
## [1] "enriched.GO is"
## category over_represented_pvalue under_represented_pvalue numDEInCat
## 1210 GO:0010200 4.504540e-16 1.0000000 35
## 2253 GO:0042742 5.385608e-14 1.0000000 56
## 638 GO:0006952 7.545274e-13 1.0000000 72
## 2750 GO:0050832 2.359748e-11 1.0000000 37
## 890 GO:0009611 5.566564e-11 1.0000000 36
## 3708 GO:2000022 2.000124e-10 1.0000000 16
## 899 GO:0009626 6.561878e-10 1.0000000 20
## 423 GO:0006468 2.148206e-09 1.0000000 81
## 853 GO:0009407 2.454257e-08 1.0000000 11
## 1166 GO:0010112 2.807664e-08 1.0000000 8
## 557 GO:0006749 1.255567e-07 1.0000000 12
## 894 GO:0009617 1.473423e-07 1.0000000 22
## 1174 GO:0010120 2.496944e-07 1.0000000 8
## 972 GO:0009751 4.766890e-07 0.9999999 25
## 900 GO:0009627 6.998144e-07 0.9999999 13
## 855 GO:0009409 1.752277e-06 0.9999993 37
## 1038 GO:0009871 3.976235e-06 0.9999999 5
## 1858 GO:0031348 5.987811e-06 0.9999992 10
## 1857 GO:0031347 8.866320e-06 0.9999986 11
## 646 GO:0006979 1.247452e-05 0.9999955 28
## 3442 GO:1900067 1.481476e-05 1.0000000 3
## 1183 GO:0010150 2.707898e-05 0.9999927 17
## 1107 GO:0010030 2.844214e-05 0.9999967 8
## 49 GO:0000272 3.213706e-05 0.9999970 7
## 2986 GO:0062034 3.975137e-05 0.9999991 4
## 2439 GO:0045332 4.455056e-05 0.9999967 6
## 185 GO:0002229 5.052194e-05 0.9999887 13
## 2859 GO:0051707 9.404250e-05 0.9999827 10
## 234 GO:0006032 9.606073e-05 0.9999914 6
## 1460 GO:0015749 1.074678e-04 0.9999934 5
## 478 GO:0006562 1.084541e-04 0.9999992 3
## 1291 GO:0010345 1.123459e-04 0.9999869 7
## 619 GO:0006887 1.685980e-04 0.9999666 10
## 921 GO:0009651 1.797603e-04 0.9999078 44
## 3251 GO:0080142 1.838731e-04 0.9999872 5
## 944 GO:0009697 1.865949e-04 0.9999867 5
## 859 GO:0009414 2.028253e-04 0.9999119 29
## 1001 GO:0009816 2.098586e-04 0.9999573 10
## 2617 GO:0048194 2.349755e-04 0.9999825 5
## 1177 GO:0010133 2.697046e-04 0.9999958 3
## 1030 GO:0009862 2.758968e-04 0.9999781 5
## 2247 GO:0042593 3.361831e-04 0.9999921 3
## 1002 GO:0009817 3.842136e-04 0.9999234 9
## 187 GO:0002237 4.003418e-04 0.9999202 9
## 2223 GO:0042344 4.121584e-04 0.9999773 4
## 1859 GO:0031349 4.498132e-04 0.9999756 4
## 2794 GO:0051258 5.343753e-04 0.9999875 3
## 2917 GO:0055114 5.773902e-04 0.9996410 71
## numInCat
## 1210 286
## 2253 726
## 638 1165
## 2750 469
## 890 419
## 3708 89
## 899 140
## 423 1484
## 853 67
## 1166 22
## 557 85
## 894 241
## 1174 27
## 972 347
## 900 104
## 855 696
## 1038 11
## 1858 64
## 1857 95
## 646 502
## 3442 3
## 1183 219
## 1107 54
## 49 39
## 2986 8
## 2439 23
## 185 126
## 2859 97
## 234 35
## 1460 18
## 478 4
## 1291 41
## 619 96
## 921 1045
## 3251 19
## 944 21
## 859 596
## 1001 97
## 2617 20
## 1177 5
## 1030 24
## 2247 8
## 1002 100
## 187 88
## 2223 15
## 1859 13
## 2794 6
## 2917 1923
## term
## 1210 response to chitin
## 2253 defense response to bacterium
## 638 defense response
## 2750 defense response to fungus
## 890 response to wounding
## 3708 regulation of jasmonic acid mediated signaling pathway
## 899 plant-type hypersensitive response
## 423 protein phosphorylation
## 853 toxin catabolic process
## 1166 regulation of systemic acquired resistance
## 557 glutathione metabolic process
## 894 response to bacterium
## 1174 camalexin biosynthetic process
## 972 response to salicylic acid
## 900 systemic acquired resistance
## 855 response to cold
## 1038 jasmonic acid and ethylene-dependent systemic resistance, ethylene mediated signaling pathway
## 1858 negative regulation of defense response
## 1857 regulation of defense response
## 646 response to oxidative stress
## 3442 regulation of cellular response to alkaline pH
## 1183 leaf senescence
## 1107 positive regulation of seed germination
## 49 polysaccharide catabolic process
## 2986 L-pipecolic acid biosynthetic process
## 2439 phospholipid translocation
## 185 defense response to oomycetes
## 2859 response to other organism
## 234 chitin catabolic process
## 1460 monosaccharide transmembrane transport
## 478 proline catabolic process
## 1291 suberin biosynthetic process
## 619 exocytosis
## 921 response to salt stress
## 3251 regulation of salicylic acid biosynthetic process
## 944 salicylic acid biosynthetic process
## 859 response to water deprivation
## 1001 defense response to bacterium, incompatible interaction
## 2617 Golgi vesicle budding
## 1177 proline catabolic process to glutamate
## 1030 systemic acquired resistance, salicylic acid mediated signaling pathway
## 2247 glucose homeostasis
## 1002 defense response to fungus, incompatible interaction
## 187 response to molecule of bacterial origin
## 2223 indole glucosinolate catabolic process
## 1859 positive regulation of defense response
## 2794 protein polymerization
## 2917 oxidation-reduction process
## ontology over_represented_padjust
## 1210 BP 1.706770e-12
## 2253 BP 1.020303e-10
## 638 BP 9.529681e-10
## 2750 BP 2.235271e-08
## 890 BP 4.218342e-08
## 3708 BP 1.263079e-07
## 899 BP 3.551851e-07
## 423 BP 1.017444e-06
## 853 BP 1.033242e-05
## 1166 BP 1.063824e-05
## 557 BP 4.324859e-05
## 894 BP 4.652334e-05
## 1174 BP 7.277632e-05
## 972 BP 1.290125e-04
## 900 BP 1.767731e-04
## 855 BP 4.149611e-04
## 1038 BP 8.862326e-04
## 1858 BP 1.260434e-03
## 1857 BP 1.768131e-03
## 646 BP 2.363297e-03
## 3442 BP 2.673007e-03
## 1183 BP 4.663739e-03
## 1107 BP 4.685533e-03
## 49 BP 5.073638e-03
## 2986 BP 6.024717e-03
## 2439 BP 6.492387e-03
## 185 BP 7.089912e-03
## 2859 BP 1.255083e-02
## 234 BP 1.255083e-02
## 1460 BP 1.325589e-02
## 478 BP 1.325589e-02
## 1291 BP 1.330246e-02
## 619 BP 1.935812e-02
## 921 BP 1.963911e-02
## 3251 BP 1.963911e-02
## 944 BP 1.963911e-02
## 859 BP 2.077041e-02
## 1001 BP 2.092512e-02
## 2617 BP 2.282878e-02
## 1177 BP 2.549690e-02
## 1030 BP 2.549690e-02
## 2247 BP 3.032851e-02
## 1002 BP 3.385547e-02
## 187 BP 3.447489e-02
## 2223 BP 3.470374e-02
## 1859 BP 3.705092e-02
## 2794 BP 4.307975e-02
## 2917 BP 4.557774e-02
# handling "no enriched GO"
# genelist.names<-c("GO.ORA.temp.up_down","GO.ORA.temp.down_up") # test
x<-list(GO.ORA.temp.up=GO.ORA.temp.up,
GO.ORA.temp.down=GO.ORA.temp.down) # list
# x<-x[!x=="no enriched GO"] # remove "no enriched GO" result
## add sample info and FC info and save GO.ORA result
if(length(x)==0) {next} else {GO.ORA.result<-x}
GO.ORA.result
## $GO.ORA.temp.up
## category over_represented_pvalue under_represented_pvalue numDEInCat
## 3164 GO:0071732 6.820561e-08 1.0000000 8
## 3114 GO:0071369 2.089131e-07 1.0000000 8
## 1195 GO:0010167 1.021437e-06 0.9999999 7
## 3094 GO:0071281 1.955280e-06 0.9999998 8
## 1530 GO:0016036 7.136493e-06 0.9999990 10
## 254 GO:0006096 2.202118e-05 0.9999970 9
## 1445 GO:0015706 8.135340e-05 0.9999948 5
## numInCat term ontology
## 3164 52 cellular response to nitric oxide BP
## 3114 62 cellular response to ethylene stimulus BP
## 1195 53 response to nitrate BP
## 3094 77 cellular response to iron ion BP
## 1530 148 cellular response to phosphate starvation BP
## 254 138 glycolytic process BP
## 1445 39 nitrate transport BP
## over_represented_padjust Term
## 3164 0.0002584311 cellular response to nitric oxide
## 3114 0.0003957859 cellular response to ethylene stimulus
## 1195 0.0012900754 response to nitrate
## 3094 0.0018521386 cellular response to iron ion
## 1530 0.0054080343 cellular response to phosphate starvation
## 254 0.0139063745 glycolytic process
## 1445 0.0440354306 nitrate transport
## Definition
## 3164 Any process that results in a change in state or activity of a cell (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a nitric oxide stimulus.
## 3114 Any process that results in a change in state or activity of a cell (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of an ethylene (ethene) stimulus.
## 1195 Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a nitrate stimulus.
## 3094 Any process that results in a change in state or activity of a cell (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of an iron ion stimulus.
## 1530 Any process that results in a change in state or activity of a cell (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of deprivation of phosphate.
## 254 The chemical reactions and pathways resulting in the breakdown of a carbohydrate into pyruvate, with the concomitant production of a small amount of ATP and the reduction of NAD(P) to NAD(P)H. Glycolysis begins with the metabolism of a carbohydrate to generate products that can enter the pathway and ends with the production of pyruvate. Pyruvate may be converted to acetyl-coenzyme A, ethanol, lactate, or other small molecules.
## 1445 The directed movement of nitrate into, out of or within a cell, or between cells, by means of some agent such as a transporter or pore.
##
## $GO.ORA.temp.down
## category over_represented_pvalue under_represented_pvalue numDEInCat
## 1210 GO:0010200 4.504540e-16 1.0000000 35
## 2253 GO:0042742 5.385608e-14 1.0000000 56
## 638 GO:0006952 7.545274e-13 1.0000000 72
## 2750 GO:0050832 2.359748e-11 1.0000000 37
## 890 GO:0009611 5.566564e-11 1.0000000 36
## 3708 GO:2000022 2.000124e-10 1.0000000 16
## 899 GO:0009626 6.561878e-10 1.0000000 20
## 423 GO:0006468 2.148206e-09 1.0000000 81
## 853 GO:0009407 2.454257e-08 1.0000000 11
## 1166 GO:0010112 2.807664e-08 1.0000000 8
## 557 GO:0006749 1.255567e-07 1.0000000 12
## 894 GO:0009617 1.473423e-07 1.0000000 22
## 1174 GO:0010120 2.496944e-07 1.0000000 8
## 972 GO:0009751 4.766890e-07 0.9999999 25
## 900 GO:0009627 6.998144e-07 0.9999999 13
## 855 GO:0009409 1.752277e-06 0.9999993 37
## 1038 GO:0009871 3.976235e-06 0.9999999 5
## 1858 GO:0031348 5.987811e-06 0.9999992 10
## 1857 GO:0031347 8.866320e-06 0.9999986 11
## 646 GO:0006979 1.247452e-05 0.9999955 28
## 3442 GO:1900067 1.481476e-05 1.0000000 3
## 1183 GO:0010150 2.707898e-05 0.9999927 17
## 1107 GO:0010030 2.844214e-05 0.9999967 8
## 49 GO:0000272 3.213706e-05 0.9999970 7
## 2986 GO:0062034 3.975137e-05 0.9999991 4
## 2439 GO:0045332 4.455056e-05 0.9999967 6
## 185 GO:0002229 5.052194e-05 0.9999887 13
## 2859 GO:0051707 9.404250e-05 0.9999827 10
## 234 GO:0006032 9.606073e-05 0.9999914 6
## 1460 GO:0015749 1.074678e-04 0.9999934 5
## 478 GO:0006562 1.084541e-04 0.9999992 3
## 1291 GO:0010345 1.123459e-04 0.9999869 7
## 619 GO:0006887 1.685980e-04 0.9999666 10
## 921 GO:0009651 1.797603e-04 0.9999078 44
## 3251 GO:0080142 1.838731e-04 0.9999872 5
## 944 GO:0009697 1.865949e-04 0.9999867 5
## 859 GO:0009414 2.028253e-04 0.9999119 29
## 1001 GO:0009816 2.098586e-04 0.9999573 10
## 2617 GO:0048194 2.349755e-04 0.9999825 5
## 1177 GO:0010133 2.697046e-04 0.9999958 3
## 1030 GO:0009862 2.758968e-04 0.9999781 5
## 2247 GO:0042593 3.361831e-04 0.9999921 3
## 1002 GO:0009817 3.842136e-04 0.9999234 9
## 187 GO:0002237 4.003418e-04 0.9999202 9
## 2223 GO:0042344 4.121584e-04 0.9999773 4
## 1859 GO:0031349 4.498132e-04 0.9999756 4
## 2794 GO:0051258 5.343753e-04 0.9999875 3
## 2917 GO:0055114 5.773902e-04 0.9996410 71
## numInCat
## 1210 286
## 2253 726
## 638 1165
## 2750 469
## 890 419
## 3708 89
## 899 140
## 423 1484
## 853 67
## 1166 22
## 557 85
## 894 241
## 1174 27
## 972 347
## 900 104
## 855 696
## 1038 11
## 1858 64
## 1857 95
## 646 502
## 3442 3
## 1183 219
## 1107 54
## 49 39
## 2986 8
## 2439 23
## 185 126
## 2859 97
## 234 35
## 1460 18
## 478 4
## 1291 41
## 619 96
## 921 1045
## 3251 19
## 944 21
## 859 596
## 1001 97
## 2617 20
## 1177 5
## 1030 24
## 2247 8
## 1002 100
## 187 88
## 2223 15
## 1859 13
## 2794 6
## 2917 1923
## term
## 1210 response to chitin
## 2253 defense response to bacterium
## 638 defense response
## 2750 defense response to fungus
## 890 response to wounding
## 3708 regulation of jasmonic acid mediated signaling pathway
## 899 plant-type hypersensitive response
## 423 protein phosphorylation
## 853 toxin catabolic process
## 1166 regulation of systemic acquired resistance
## 557 glutathione metabolic process
## 894 response to bacterium
## 1174 camalexin biosynthetic process
## 972 response to salicylic acid
## 900 systemic acquired resistance
## 855 response to cold
## 1038 jasmonic acid and ethylene-dependent systemic resistance, ethylene mediated signaling pathway
## 1858 negative regulation of defense response
## 1857 regulation of defense response
## 646 response to oxidative stress
## 3442 regulation of cellular response to alkaline pH
## 1183 leaf senescence
## 1107 positive regulation of seed germination
## 49 polysaccharide catabolic process
## 2986 L-pipecolic acid biosynthetic process
## 2439 phospholipid translocation
## 185 defense response to oomycetes
## 2859 response to other organism
## 234 chitin catabolic process
## 1460 monosaccharide transmembrane transport
## 478 proline catabolic process
## 1291 suberin biosynthetic process
## 619 exocytosis
## 921 response to salt stress
## 3251 regulation of salicylic acid biosynthetic process
## 944 salicylic acid biosynthetic process
## 859 response to water deprivation
## 1001 defense response to bacterium, incompatible interaction
## 2617 Golgi vesicle budding
## 1177 proline catabolic process to glutamate
## 1030 systemic acquired resistance, salicylic acid mediated signaling pathway
## 2247 glucose homeostasis
## 1002 defense response to fungus, incompatible interaction
## 187 response to molecule of bacterial origin
## 2223 indole glucosinolate catabolic process
## 1859 positive regulation of defense response
## 2794 protein polymerization
## 2917 oxidation-reduction process
## ontology over_represented_padjust
## 1210 BP 1.706770e-12
## 2253 BP 1.020303e-10
## 638 BP 9.529681e-10
## 2750 BP 2.235271e-08
## 890 BP 4.218342e-08
## 3708 BP 1.263079e-07
## 899 BP 3.551851e-07
## 423 BP 1.017444e-06
## 853 BP 1.033242e-05
## 1166 BP 1.063824e-05
## 557 BP 4.324859e-05
## 894 BP 4.652334e-05
## 1174 BP 7.277632e-05
## 972 BP 1.290125e-04
## 900 BP 1.767731e-04
## 855 BP 4.149611e-04
## 1038 BP 8.862326e-04
## 1858 BP 1.260434e-03
## 1857 BP 1.768131e-03
## 646 BP 2.363297e-03
## 3442 BP 2.673007e-03
## 1183 BP 4.663739e-03
## 1107 BP 4.685533e-03
## 49 BP 5.073638e-03
## 2986 BP 6.024717e-03
## 2439 BP 6.492387e-03
## 185 BP 7.089912e-03
## 2859 BP 1.255083e-02
## 234 BP 1.255083e-02
## 1460 BP 1.325589e-02
## 478 BP 1.325589e-02
## 1291 BP 1.330246e-02
## 619 BP 1.935812e-02
## 921 BP 1.963911e-02
## 3251 BP 1.963911e-02
## 944 BP 1.963911e-02
## 859 BP 2.077041e-02
## 1001 BP 2.092512e-02
## 2617 BP 2.282878e-02
## 1177 BP 2.549690e-02
## 1030 BP 2.549690e-02
## 2247 BP 3.032851e-02
## 1002 BP 3.385547e-02
## 187 BP 3.447489e-02
## 2223 BP 3.470374e-02
## 1859 BP 3.705092e-02
## 2794 BP 4.307975e-02
## 2917 BP 4.557774e-02
## Term
## 1210 response to chitin
## 2253 defense response to bacterium
## 638 defense response
## 2750 defense response to fungus
## 890 response to wounding
## 3708 regulation of jasmonic acid mediated signaling pathway
## 899 plant-type hypersensitive response
## 423 protein phosphorylation
## 853 toxin catabolic process
## 1166 regulation of systemic acquired resistance
## 557 glutathione metabolic process
## 894 response to bacterium
## 1174 camalexin biosynthetic process
## 972 response to salicylic acid
## 900 systemic acquired resistance
## 855 response to cold
## 1038 jasmonic acid and ethylene-dependent systemic resistance, ethylene mediated signaling pathway
## 1858 negative regulation of defense response
## 1857 regulation of defense response
## 646 response to oxidative stress
## 3442 regulation of cellular response to alkaline pH
## 1183 leaf senescence
## 1107 positive regulation of seed germination
## 49 polysaccharide catabolic process
## 2986 L-pipecolic acid biosynthetic process
## 2439 phospholipid translocation
## 185 defense response to oomycetes
## 2859 response to other organism
## 234 chitin catabolic process
## 1460 monosaccharide transmembrane transport
## 478 proline catabolic process
## 1291 suberin biosynthetic process
## 619 exocytosis
## 921 response to salt stress
## 3251 regulation of salicylic acid biosynthetic process
## 944 salicylic acid biosynthetic process
## 859 response to water deprivation
## 1001 defense response to bacterium, incompatible interaction
## 2617 Golgi vesicle budding
## 1177 proline catabolic process to glutamate
## 1030 systemic acquired resistance, salicylic acid mediated signaling pathway
## 2247 glucose homeostasis
## 1002 defense response to fungus, incompatible interaction
## 187 response to molecule of bacterial origin
## 2223 indole glucosinolate catabolic process
## 1859 positive regulation of defense response
## 2794 protein polymerization
## 2917 oxidation-reduction process
## Definition
## 1210 A process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a chitin stimulus.
## 2253 Reactions triggered in response to the presence of a bacterium that act to protect the cell or organism.
## 638 Reactions, triggered in response to the presence of a foreign body or the occurrence of an injury, which result in restriction of damage to the organism attacked or prevention/recovery from the infection caused by the attack.
## 2750 Reactions triggered in response to the presence of a fungus that act to protect the cell or organism.
## 890 Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a stimulus indicating damage to the organism.
## 3708 Any process that modulates the frequency, rate or extent of jasmonic acid mediated signaling pathway.
## 899 The rapid, localized death of plant cells in response to invasion by a pathogen.
## 423 The process of introducing a phosphate group on to a protein.
## 853 The chemical reactions and pathways resulting in the breakdown of toxin, a poisonous compound (typically a protein) that is produced by cells or organisms and that can cause disease when introduced into the body or tissues of an organism.
## 1166 Any process that modulates the frequency, rate or extent of systemic acquired resistance.
## 557 The chemical reactions and pathways involving glutathione, the tripeptide glutamylcysteinylglycine, which acts as a coenzyme for some enzymes and as an antioxidant in the protection of sulfhydryl groups in enzymes and other proteins; it has a specific role in the reduction of hydrogen peroxide (H2O2) and oxidized ascorbate, and it participates in the gamma-glutamyl cycle.
## 894 Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a stimulus from a bacterium.
## 1174 The chemical reactions and pathways resulting in the formation of camalexin, an indole phytoalexin.
## 972 Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a salicylic acid stimulus.
## 900 The salicylic acid mediated response to a pathogen which confers broad spectrum resistance.
## 855 Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a cold stimulus, a temperature stimulus below the optimal temperature for that organism.
## 1038 The series of molecular signals mediated by ethylene (ethene) involved in jasmonic acid/ethylene dependent systemic resistance.
## 1858 Any process that stops, prevents, or reduces the frequency, rate or extent of a defense response.
## 1857 Any process that modulates the frequency, rate or extent of a defense response.
## 646 Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of oxidative stress, a state often resulting from exposure to high levels of reactive oxygen species, e.g. superoxide anions, hydrogen peroxide (H2O2), and hydroxyl radicals.
## 3442 <NA>
## 1183 The process that occurs in a leaf near the end of its active life that is associated with the dismantling of cell components and membranes, loss of functional chloroplasts, and an overall decline in metabolism.
## 1107 Any process that activates or increase the rate of seed germination.
## 49 The chemical reactions and pathways resulting in the breakdown of a polysaccharide, a polymer of many (typically more than 10) monosaccharide residues linked glycosidically.
## 2986 The chemical reactions and pathways resulting in the formation of L-pipecolic acid, a metabolite of lysine.
## 2439 The movement of a phospholipid molecule from one leaflet of a membrane bilayer to the opposite leaflet.
## 185 Reactions triggered in response to the presence of oomycetes that act to protect the cell or organism.
## 2859 Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a stimulus from another living organism.
## 234 The chemical reactions and pathways resulting in the breakdown of chitin, a linear polysaccharide consisting of beta-(1->4)-linked N-acetyl-D-glucosamine residues.
## 1460 The process in which a monosaccharide is transported across a lipid bilayer, from one side of a membrane to the other. Monosaccharides are the simplest carbohydrates; they are polyhydric alcohols containing either an aldehyde or a keto group and between three to ten or more carbon atoms. They form the constitutional repeating units of oligo- and polysaccharides.
## 478 The chemical reactions and pathways resulting in the breakdown of proline (pyrrolidine-2-carboxylic acid), a chiral, cyclic, nonessential alpha-amino acid found in peptide linkage in proteins.
## 1291 The chemical reactions and pathways resulting in the formation of suberin monomers and suberin polyesters. Suberin monomers are derived from fatty acids and trans-cinnamic acids. The monomers are then cross-linked with glycerols.
## 619 A process of secretion by a cell that results in the release of intracellular molecules (e.g. hormones, matrix proteins) contained within a membrane-bounded vesicle. Exocytosis can occur either by full fusion, when the vesicle collapses into the plasma membrane, or by a kiss-and-run mechanism that involves the formation of a transient contact, a pore, between a granule (for exemple of chromaffin cells) and the plasma membrane. The latter process most of the time leads to only partial secretion of the granule content. Exocytosis begins with steps that prepare vesicles for fusion with the membrane (tethering and docking) and ends when molecules are secreted from the cell.
## 921 Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a stimulus indicating an increase or decrease in the concentration of salt (particularly but not exclusively sodium and chloride ions) in the environment.
## 3251 Any process that modulates the frequency, rate or extent of the chemical reactions and pathways resulting in the formation of salicylic acid.
## 944 The chemical reactions and pathways resulting in the formation of salicylic acid (2-hydroxybenzoic acid), a derivative of benzoic acid.
## 859 Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a water deprivation stimulus, prolonged deprivation of water.
## 1001 A response of an organism to a bacterium that prevents the occurrence or spread of disease.
## 2617 The evagination of the Golgi membrane, resulting in formation of a vesicle.
## 1177 The chemical reactions and pathways resulting in the breakdown of proline into other compounds, including glutamate.
## 1030 The series of molecular signals mediated by salicylic acid involved in systemic acquired resistance.
## 2247 Any process involved in the maintenance of an internal steady state of glucose within an organism or cell.
## 1002 A response of an organism to a fungus that prevents the occurrence or spread of disease.
## 187 Any process that results in a change in state or activity of an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a stimulus by molecules of bacterial origin such as peptides derived from bacterial flagellin.
## 2223 The chemical reactions and pathways resulting in the breakdown of indole glucosinolates, sulfur-containing compounds that have a common structure linked to an R group derived from tryptophan.
## 1859 Any process that activates or increases the frequency, rate or extent of a defense response.
## 2794 The process of creating protein polymers, compounds composed of a large number of component monomers; polymeric proteins may be made up of different or identical monomers. Polymerization occurs by the addition of extra monomers to an existing poly- or oligomeric protein.
## 2917 A metabolic process that results in the removal or addition of one or more electrons to or from a substance, with or without the concomitant removal or addition of a proton or protons.
# save data
save(GO.ORA.result,file="../output/GOseq.timecourse.twoafternoon.Brgo.v3.0.Atgoslim.BP.list.enrich.Rdata")
sessionInfo
## function (package = NULL)
## {
## z <- list()
## z$R.version <- R.Version()
## z$platform <- z$R.version$platform
## if (nzchar(.Platform$r_arch))
## z$platform <- paste(z$platform, .Platform$r_arch, sep = "/")
## z$platform <- paste0(z$platform, " (", 8 * .Machine$sizeof.pointer,
## "-bit)")
## z$locale <- Sys.getlocale()
## z$running <- osVersion
## z$RNGkind <- RNGkind()
## if (is.null(package)) {
## package <- grep("^package:", search(), value = TRUE)
## keep <- vapply(package, function(x) x == "package:base" ||
## !is.null(attr(as.environment(x), "path")), NA)
## package <- .rmpkg(package[keep])
## }
## pkgDesc <- lapply(package, packageDescription, encoding = NA)
## if (length(package) == 0)
## stop("no valid packages were specified")
## basePkgs <- sapply(pkgDesc, function(x) !is.null(x$Priority) &&
## x$Priority == "base")
## z$basePkgs <- package[basePkgs]
## if (any(!basePkgs)) {
## z$otherPkgs <- pkgDesc[!basePkgs]
## names(z$otherPkgs) <- package[!basePkgs]
## }
## loadedOnly <- loadedNamespaces()
## loadedOnly <- loadedOnly[!(loadedOnly %in% package)]
## if (length(loadedOnly)) {
## names(loadedOnly) <- loadedOnly
## pkgDesc <- c(pkgDesc, lapply(loadedOnly, packageDescription))
## z$loadedOnly <- pkgDesc[loadedOnly]
## }
## z$matprod <- as.character(options("matprod"))
## es <- extSoftVersion()
## z$BLAS <- as.character(es["BLAS"])
## z$LAPACK <- La_library()
## class(z) <- "sessionInfo"
## z
## }
## <bytecode: 0x7fe3cbcc1b98>
## <environment: namespace:utils>